package protocol.JT808_2019;

public class Handle808_2019JT05 implements IHandle808_2019JT {

    @Override
    public String handle(JT808_2019Cmd cmd) {
        byte subOrder = cmd.subOrder();

        switch (subOrder){
            case 0x00:
                return handle0500(cmd);
            default:
                return "808-2019:未匹配的命令字"+(cmd.readOrder()+","+cmd.subOrder());
        }
    }

    private String handle0500(JT808_2019Cmd cmd) {
        StringBuilder builder = new StringBuilder();
        builder.append("终端->平台:车辆控制应答");
        builder.append("\r\n");
        builder.append("应答流水号:" + cmd.readWORD());
        builder.append("\r\n");

        JT808_2019Utils.handle0200ALL(builder, cmd);
        return builder.toString();
    }
}
